# Program variables (DON'T DELETE!!!)
block_speed = -6 # controls how fast the pipes move across the stage
block_gap = 200 # controls the space between the top and bottom of each pipe
block_interval = 1 # controls how often a new pipe appears
gravity = 10 # controls how fast the sprite falls
flappiness = 5 # controls how much the sprite moves up
# Store and display score
score = 0
score_text = codesters.Text("Score: " + str(score), 100, 200, "yellow")
########################################################################
# ADD CODE BELOW THIS LINE #
########################################################################
t = codesters.Teacher()
set_backgrounds = t.find_function("set_background")
disable_walls = t.find_function("disable_all_walls")
try:
tval1 = set_backgrounds[0][1].lower().replace(' ','')
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success('"space"' in tval1, "Great Job!")
t1.add_failure(tval1 == "DNE", "Did you add a background?")
t1.add_creative(tval1 != "DNE" and '"space"' not in tval1, "Nice! That's a great background too.")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)